1. Field of the Invention
The present invention relates to databases, and more specifically to a method of providing information from a database at an increased speed.
2. Description of Related Art
There are now many centralized databases that can be accessed through a network, including read-only databases that are publicly accessible over the Internet. For example, there are numerous sites on the Internet that make available large informational databases containing information such as yellow pages listings and public document collections. A user typically accesses such a database over the Internet by using a dedicated program such as a Java applet running in a web browser. The Java applet and web browser operate to retrieve information from the database tables through a remote database server, and then display the information to the user. For example, if the requested information is to be displayed in a list box, the Java applet issues a query to the database, fetches the resulting information from the database, formats the information into a list box, and then displays the list box to the user.
While such Java applets can access information by directly querying remote database servers, the speed of obtaining the information can be horrendous for database queries that return numerous results (e.g., hundreds or thousands). Furthermore, the running of the database application across the Internet introduces further delays. When the process of retrieving information from a database server is slow, the user notices a performance degradation in the user interface (i.e., Java applet) that can be significant or even unacceptable. Thus, there is a recognized need to increase the speed of database information retrieval over networks, especially for database information that is read-only.
It has been proposed to improve database information retrieval in an Internet environment by having a Java applet running on a user's system use a web service such as a Java "servlet" to obtain database information. In such a case, the database queries are performed on the web server as opposed to having the Java applet query the database directly in the manner described above. Because the queries are performed on the web server, the database can be queried and the resulting information stored in memory in the servlet in advance (i.e., before any user requests for the information are received). However, this requires memory on the web server to be used for requests that may never actually be made. If more memory or storage capacity (e.g., hard disk space) is required, the cost of the web server is increased.
Additionally, any time the database information is reloaded, the information stored in memory becomes stale so the web server must be brought down and restarted to reload the memory with the proper results for the queries. This causes a disruption in service and may not even be an option for high availability applications. Furthermore, the servlet must manage and provide access to the stored results information so even more resources on the web server are consumed. As more and more of its resources are consumed, the web server becomes able to handle fewer and fewer user requests.